Add shared WorkOS Vault test client#482
Merged
RhysSullivan merged 2 commits intomainfrom May 4, 2026
Merged
Conversation
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
executor-marketing | f7e010e | Commit Preview URL Branch Preview URL |
May 04 2026, 03:19 AM |
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
executor-cloud | f7e010e | May 04 2026, 03:20 AM |
Extract the in-memory `WorkOSVaultClient` previously inlined in `apps/cloud/.../api-harness.ts` into a published subpath `@executor-js/plugin-workos-vault/testing` so other apps and downstream consumers can stand up vault-backed tests without copying the fake. `makeTestWorkOSVaultClient` matches the current Effect-shaped client surface (post v4 migration) and adds optional knobs for exercising secret-store retry paths: `conflictOnNextSecretUpdate`, `rejectNamesWithColon`, and `rejectReadNamesLongerThan`. Errors are tagged (`TestWorkOSVaultNotFoundError`/`Conflict`/`InvalidRequest`) and carry numeric `status` so the production `isStatusError` checks in `secret-store.ts` route 404/409/400 through the same paths the real SDK exercises. Re-cut from #424 against current `main`; the `mcp.ts` and contract test pieces from that PR are intentionally dropped (the audience-fallback removal landed via #429 and the contract test is out of scope for this extraction).
@executor-js/cli
@executor-js/config
@executor-js/execution
@executor-js/sdk
@executor-js/storage-core
@executor-js/codemode-core
@executor-js/runtime-quickjs
@executor-js/plugin-file-secrets
@executor-js/plugin-google-discovery
@executor-js/plugin-graphql
@executor-js/plugin-keychain
@executor-js/plugin-mcp
@executor-js/plugin-onepassword
@executor-js/plugin-openapi
executor
commit: |
9255434 to
f7e010e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
makeFakeVaultClientpreviously inlined inapps/cloud/src/services/__test-harness__/api-harness.tsinto a published subpath@executor-js/plugin-workos-vault/testing(makeTestWorkOSVaultClient).WorkOSVaultClientinterface (post Effect v4 migration) and ships tagged errors (TestWorkOSVaultNotFoundError/Conflict/InvalidRequest) carrying numericstatusso the existingisStatusErrorchecks insecret-store.tsroute 404 / 409 / 400 through the same paths a real WorkOS SDK rejection would.conflictOnNextSecretUpdate,rejectNamesWithColon,rejectReadNamesLongerThan.package.jsonexports(andpublishConfig.exports) plustsup.config.tsso the subpath is consumable both inside the workspace and once published.api-harness.tsandmcp-session.e2e.node.test.tsto consume the new subpath; deletes the inlined fake.This is a re-cut of #424 against current
main. Themcp.tsaudience-fallback removal from that PR is dropped — it already landed via #429 — and theworkos-vault.contract.test.tsis out of scope for this extraction.Test plan
bun run --cwd packages/plugins/workos-vault typecheckbun run --cwd apps/cloud typecheckbun run --cwd packages/plugins/workos-vault buildbun run --cwd packages/plugins/workos-vault test(11/11)bun run --cwd apps/cloud test:node(12 files, 68/68)bun run lint